import json
import os

#print(os.getcwd())
res = open("results.txt").read()
datalist = json.loads(res)
group = []
nodes = []
links = []
fw = open('groups.txt', 'w')
for data in datalist:
    print(data['x'], data['y'])

    group.append(data)
    fw.write(data['x'] + ',' + data['y'] + ',' + data['title'] + '\n')

print(len(datalist))


